package com.he.apps;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.he.datasource.GlobalDataConfiguration;

/**
 * Hello world!
 *
 */
@SpringBootApplication
public class App {
	@Value("${name}")
	private String name;

	@RequestMapping("/")
	String home() {
		return String.format("Hello %s!", name);
	}

	public static void main(String[] args) throws Exception {
		SpringApplication.run(App.class, args);
		DataSource dataSource = new GlobalDataConfiguration().secondaryDataSource();
		System.err.println(dataSource);
		
	}
}
